package com.ww.learn.oop

import java.lang.RuntimeException

class Person(val first: String, val last: String) {

    var fulltime = true

    var location: String = "-"

    constructor(first: String, last: String, fte: Boolean) : this(first, last) {
        fulltime = fte
    }

    constructor(first: String, last: String, loc: String) : this(first, last, false) {
        location = loc
    }

    internal fun fullName() = "$last, $first"

    override fun toString() = "$first $last $fulltime $location"

    private fun yearsOfService(): Int = throw RuntimeException("Not implemented yet")
}

fun main() {
    println(Person("Jane", "Doe"))
    println(Person("Jane", "Doe", false))
    println(Person("Jane", "Doe", "home"))

    val jane = Person("Jane", "Doe")
    println(jane.fullName())
}